from info import app_create, db, models
from flask import session
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
import logging

# Session只是用来指定session的存储位置


"""
1.数据库配置
2.redis配置
3.session配置
4.csrf配置
5.迁移
6.日志记录
"""""

app = app_create('develop')
# print(app.config['SQLALCHEMY_DATABASE_URI'])
# 创建manager对象管理app
manager = Manager(app)

# 使用Migrate关联db和app
Migrate(app, db)

# 添加操作命令
manager.add_command('db', MigrateCommand)



if __name__ == '__main__':
    manager.run()